<template>
  <section>
    <b-spinner v-if="loading" variant="primary" type="grow" label="Spinning" />
    <div>
      <h4 class="title">
        {{ defData.title }}
      </h4>
      <div class="an-cont">
        <div v-html="defData.article_content"></div>
      </div>
    </div>
  </section>
</template>

<script>
import { getIsTopInfo } from "~/assets/services/api";
export default {
  data() {
    return {
      loading: false,
      defData: {
        title: "",
        article_content: ""
      }
    };
  },
  /* asyncData({ app, query }) {
    return app.$axios
      .post(`/php-phalapi/public/?service=App.Web_Article.IsTopArticleInfo`, "")
      .then(res => {
        return { defData: res.data.data.result };
      });
  }, */
  mounted() {
    this.anLoad();
  },
  methods: {
    async anLoad() {
      this.loading = true;
      const res = await getIsTopInfo();
      this.defData = res;
      this.loading = false;
    }
  }
};
</script>
